using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Headspring.Training.Core;

namespace Headspring.Training.UI
{
    public class Global : HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            Logger.EnsureInitialized();
            RouteCollection routes = RouteTable.Routes;

            routes.MapRoute("default", "{controller}/{action}", new {action = "index"});
            routes.MapRoute("default_aspx", "Default.aspx", new {controller = "login"});
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Expires = -1;
        }

        protected void Application_End(object sender, EventArgs e)
        {
        }
    }
}